main{
  final WeldContainer weld=new Weld().initialize();
  java.awt.EventQueue.invokeLater(new Runnable(){
      weld.event().select(ContainerInitialized.class).fire(new ContainerInitialized());
  List<Thread> threads=new ArrayList<Thread>();
  for (int i=0; i < Generator.MAX_THREADS; i++) {
    final Worker worker=weld.instance().select(Worker.class).get();
    Thread thread=new Thread(worker);
    threads.add(thread);
  for (  Thread thread : threads) {
      thread.join();
      System.exit(10000);
  ShutdownManager shutdownManager=weld.instance().select(ShutdownManager.class).get();
  shutdownManager.shutdown();
}
run{
  weld.event().select(ContainerInitialized.class).fire(new ContainerInitialized());
}
